package cn.edu.scau.nursingcenter.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import cn.edu.scau.nursingcenter.entiry.Rehabilitation;
/**
 * 康复计划DAO接口RehabilitationRepository
 * @author feng
 *
 */
@Repository
public interface RehabilitationRepository extends JpaRepository<Rehabilitation, Integer>{

	/**
	 * 根据客户名字查询
	 * @param name客户名字
	 * @return
	 */
	@Query(value = "from rehabilitation r where r.c_name = ?1")
	List<Rehabilitation> findByName(@Param("c_name")String name);
}
